package io.github.openfeign.restfulExam;

import com.google.gson.Gson;
import feign.Param;

public class GsonExpander implements Param.Expander {
    @Override
    public String expand(Object value) {
        return new Gson().toJson(value).toString();
    }

    public static void main(String[] args) {
        App.User user = new App.User();
        user.setUsername("yuanxl");
        user.setUid("123");
        System.out.println(new GsonExpander().expand(user));
    }
}
